<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加用户</title>

    <link rel="stylesheet" href="../static/css/layui.css" media="all">
</head>
<body>

<form class="layui-container layui-form" action="" >
    <div class="layui-form-item">
        <label class="layui-form-label">账户名</label>
        <div class="layui-input-inline">
            <input name="nickName" lay-verify="title" autocomplete="off"  class="layui-input" type="text">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">昵称</label>
        <div class="layui-input-inline">
            <input name="nickName" lay-verify="title" autocomplete="off"  class="layui-input" type="text">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">真实姓名</label>
        <div class="layui-input-inline">
            <input name="realName" lay-verify="title" autocomplete="off"  class="layui-input" type="text">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-inline">
            <input name="password" lay-verify="pass" placeholder="请输入密码" autocomplete="off" class="layui-input" type="password">
        </div>
        <div class="layui-form-mid layui-word-aux">请填写6到12位密码</div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-block" >
            <input type="radio"  name="gender" id="man" value="true" title="男" >
            <input type="radio" name="gender" id="woman"  value="false" title="女" >
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>

</form>


</body>
<script src="../static/layui.all.js" charset="utf-8"></script>
<script>
    layui.use(['form','jquery'], function(form,$){
        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return false;
        });

    });

</script>
</html>